#include "StdAfx.h"
#include "Connect.h"
#include <stdio.h>


Connect* Connect::m_sConnect = NULL;

Connect::Connect(void)
{
}


Connect::~Connect(void)
{
}

Connect* Connect::getSinglon()
{
	if (m_sConnect == NULL)
	{
		m_sConnect = new Connect();
	}

	return m_sConnect;
}

void Connect::sendDataToKNet( void* src, int len ,DataType type)
{
	COPYDATASTRUCT data;
	data.dwData = type;
	data.cbData = len;
	data.lpData = src;

	SendMessage(m_knetConnectWnd,WM_COPYDATA,NULL,(LPARAM)&data);
	printf("sendMessage");
	//PostThreadMessage(m_KnetThreadId,WM_COPYDATA,(WPARAM)&data,NULL);
}

void Connect::recvDataFromKNet( COPYDATASTRUCT* data )
{
	switch(data->dwData)
	{
	case CR_CAPTUREDATA_CONFIG:
		
		break;
	}
}
